#pragma once
#include<iostream>

class Task
{
public:
    Task()
    {}
    Task(int x , int y):a(x),b(y)
    {}
    void Execute()
    {
        result = a+b;
    }
    void operator()()//仿函数
    {
        Execute();
    }
    void Print()
    {
        std::cout << a << "+" << b <<"=" << result <<std::endl;
    }
    ~Task()
    {}
private:
    int a;
    int b;
    int result;
};